//2960.统计已测试设备
//https://leetcode.cn/problems/count-tested-devices-after-test-operations
class Solution {
public:
    int countTestedDevices(vector<int>& batteryPercentages) {
        vector<int>& v = batteryPercentages;

        int n = v.size();
        int ret = 0;
        for(int i = 0;i<n;++i)
            if(batteryPercentages[i] - ret > 0) ++ret;
        return ret;
    }
};